package com.itheima.day11;

import java.util.Random;

public class Test2 {
    public static void main(String[] args) {
        //定义数组
        int[] arr = new int[5];

        Random random = new Random();
        System.out.println("生成的随机数组为:");

        for(int i = 0; i < arr.length; i++){
            arr[i] = random.nextInt(9) + 2;
        }

        System.out.println(arr);



        //定义变量
        int max = arr[0];
        int min = arr[0];
        int sum = 0;

        //求出最大值
        for (int i = 0; i < arr.length; i++) {
            if(max < arr.length){

            }
        }
    }
}
